package com.shuda.common.dto;

import io.swagger.v3.oas.annotations.media.Schema;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

/**
 * 权限DTO
 * @author ink
 * @Description: 权限数据传输对象
 * @date 2024-10-10 14:30:00
 */
@Schema(name = "PermissionDTO", description = "权限数据传输对象")
public class PermissionDTO {

    @Schema(description = "权限名称")
    @NotBlank(message = "权限名称不能为空")
    private String permissionName;

    @Schema(description = "权限编码")
    @NotBlank(message = "权限编码不能为空")
    private String permissionCode;

    @Schema(description = "父权限ID")
    private Long parentId;

    @Schema(description = "权限路径")
    private String permissionPath;

    @Schema(description = "权限类型(1-菜单,2-按钮,3-接口)")
    @NotNull(message = "权限类型不能为空")
    private Integer permissionType;

    @Schema(description = "排序")
    private Integer sort;

    @Schema(description = "状态(0-禁用,1-启用)")
    private Integer status;

    /**
    *
    * PermissionDTO 访问器
    * @param $params$
    * @return $returns$
    * @author ink
    * @Description: 去除Lombok显式提供getter/setter，保证Service层拷贝与校验调用
    * @date 2025-11-10 00:14
    */
    public String getPermissionName() { return permissionName; }
    public void setPermissionName(String permissionName) { this.permissionName = permissionName; }

    public String getPermissionCode() { return permissionCode; }
    public void setPermissionCode(String permissionCode) { this.permissionCode = permissionCode; }

    public Long getParentId() { return parentId; }
    public void setParentId(Long parentId) { this.parentId = parentId; }

    public String getPermissionPath() { return permissionPath; }
    public void setPermissionPath(String permissionPath) { this.permissionPath = permissionPath; }

    public Integer getPermissionType() { return permissionType; }
    public void setPermissionType(Integer permissionType) { this.permissionType = permissionType; }

    public Integer getSort() { return sort; }
    public void setSort(Integer sort) { this.sort = sort; }

    public Integer getStatus() { return status; }
    public void setStatus(Integer status) { this.status = status; }
}